<template>
	<view>
		<view >显示字符串的方式</view>
		<view>{{shuiguo}}</view>
		<view >显示数字的方式</view>
		<view>{{number}}</view>
		<view >显示数组的方式</view>
		<view >{{ab}}</view>
		<view >显示对象的方式</view>
		<view >{{xiaolan.name+" "+xiaolan.sex}}</view>
		<view >遍历显示同学数组的方式</view>
		<view v-for="item in  xiaolan.tongxue">
			<view>性别：{{item.sex}}</view>
			<view>年龄：{{item.age}}</view>
			<view>名称：{{item.name}}</view>
		</view>
		<view v-if="number==0">这个界面是v-if控制</view>
		<input placeholder="输入内容" v-model="number"/>
	</view>
</template>

<script>
		// js JavaScript  vue框架  v-for
	export default {
		// int number = 0
		// String shuiguo = '水果'
		// int[]  ab = {0,1,2,3}
		data() {
			return {
				"shuiguo":"水果",
				number:0,
				ab:[0,1,2,3],
				xiaolan:{
					sex:"男",
					age:12,
					name:'xiaolan',
					tongxue:[{
						sex:"男",
						age:12,
						name:'xiaoming',
					},{
						sex:"男",
						age:11,
						name:'xiaohong',
					},{
						sex:"女",
						age:13,
						name:'xiaochen',
					}]
				}
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
